package com.neusoft.elmboot1.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.elmboot1.po.Cart;
import com.neusoft.elmboot1.service.ICartService;

@RestController
@CrossOrigin
@RequestMapping("/CartController")
public class CartContoller {

	@Autowired
	ICartService cartService;
	
	@RequestMapping("/listCart")
	public List<Cart> test1(@RequestBody Cart c){
		System.out.println("---------------------------###:"+c.getUserId());
		return cartService.listCart(c);
	}
}
